import request from '@/utils/request'

// 查询【请填写功能名称】列表
export function listAttendGroup(query) {
  return request({
    url: '/attend/group/list',
    method: 'get',
    params: query
  })
}


// 查询【请填写功能名称】详细
export function getAttendGroup(groupId) {
  return request({
    url: '/attend/group/' + groupId,
    method: 'get'
  })
}

// 新增【请填写功能名称】
export function addAttendGroup(data) {
  return request({
    url: '/attend/group',
    method: 'post',
    data: data
  })
}

// 修改【请填写功能名称】
export function updateAttendGroup(data) {
  return request({
    url: '/attend/group',
    method: 'put',
    data: data
  })
}

// 删除【请填写功能名称】
export function delAttendGroup(groupId) {
  return request({
    url: '/attend/group/' + groupId,
    method: 'delete'
  })
}



// 查询考勤排班已排班的员工列表
export function allocatedStaffList(query) {
  return request({
    url: '/attend/group/authStaff/allocatedList',
    method: 'get',
    params: query
  })
}

// 查询考勤排班未排班的员工列表
export function  unAllocatedStaffList(query) {
  return request({
    url: '/attend/group/authStaff/unAllocatedList',
    method: 'get',
    params: query
  })
}

// 移动员工的考勤班组信息
export function staffGroupCancel(data) {
  return request({
    url: '/attend/group/staffGroupCancel',
    method: 'put',
    data: data
  })
}

// 从考勤班组中批量移除人员
export function attendGroupCancelAll(data) {
  return request({
    url: '/attend/group/cancelAll',
    method: 'put',
    params: data
  })
}

// 将员工添加至考勤班组
export function authStaffSelectAll(data) {
  return request({
    url: '/attend/group/authSelectAll',
    method: 'put',
    params: data
  })
}
